From: Joan Torres Date: Wed, 13 Mar 2024 10:17:24 +0000 (+0100) Subject: loginDialog: Fix conflicting session notification X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~281^2^2~6 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=5d58e41cbcb0d63b9bc9fc1dc38ce0a6c1b0648d;p=gnome-shell.git loginDialog: Fix conflicting session notification The internal notification API changed between the time the code was originally written and the time the change was merged. Belatedly adapt to those changes. Part-of: --- diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js index 28db1a9de..42c421ac1 100644 --- a/js/gdm/loginDialog.js +++ b/js/gdm/loginDialog.js @@ -1074,19 +1074,20 @@ export const LoginDialog = GObject.registerClass({ } _notifyConflictingSessionDialogClosed(userName) { - const source = new MessageTray.SystemNotificationSource(); - Main.messageTray.add(source); - - this._conflictingSessionNotification = new MessageTray.Notification(source, - _('Stop conflicting session dialog closed'), - _('Try to login again to start a session for user %s.').format(userName)); - this._conflictingSessionNotification.setUrgency(MessageTray.Urgency.CRITICAL); - this._conflictingSessionNotification.setTransient(true); + const source = new MessageTray.getSystemSource(); + + this._conflictingSessionNotification = new MessageTray.Notification({ + source, + title: _('Stop conflicting session dialog closed'), + body: _('Try to login again to start a session for user %s.').format(userName), + urgency: MessageTray.Urgency.CRITICAL, + isTransient: true, + }); this._conflictingSessionNotification.connect('destroy', () => { this._conflictingSessionNotification = null; }); - source.showNotification(this._conflictingSessionNotification); + source.addNotification(this._conflictingSessionNotification); } _showConflictingSessionDialog(serviceName, conflictingSession) {